import { Component, OnInit } from '@angular/core';
import {MesService} from '../../service/mes.service'
@Component({
  selector: 'app-component-comminication',
  templateUrl: './component-comminication.component.html',
  styleUrls: ['./component-comminication.component.css']
})
export class ComponentComminicationComponent implements OnInit {


    msg='message';
    msgIndex=0;
    constructor(private messervice:MesService) { }

    ngOnInit() {
    }

    sendMsg(){
        this.messervice.sendMessage(this.msg+this.msgIndex++);
    }

}
